const mongoose = require("./db");

const orderSchema = new mongoose.Schema({
    // 设定的集合的结构
    orderId: {type:String},
    userId: {type:String},
    proData: {type: Array},
    time: {type: Number},
    state: {type: Number},
    address: {type: Object},
    logistics: {type: Object}
})

// state:0取消，1待支付，2待发货，3待收货，4待评价，5已完成

module.exports = mongoose.model("orders", orderSchema);

